#! /bin/bash

clear
if [ "$1" = "" ]; then
	echo "need folder name as argument to run packing"
	exit 2
fi
echo "packing projects in $1"

if [ "$2" = "" ]; then
	tar -zcvf "$1.tar.gz" "$1"
else	
	tar -zcvf "$1.tar.gz" -X "$2" "$1"
fi

echo "packing finished"
